<template>
    <div class="">
        <el-form label-width="120px" :inline="true" class="formsdre mt20 ab jichu" :model="csk" :rules="rules" ref="ruleForm">
            <div v-for="(sd,idx) in fieldList" class="f_b">
                <el-form-item :label="sd.label+'：'" v-if="sd.type==0" :prop="sd.prop">
                    <el-input v-model="csk[sd.prop]"></el-input>
                </el-form-item>
                <el-form-item :label="sd.label+'：'" v-if="sd.type==1" :prop="sd.prop">
                    <zhqcComboBox :label="sd.label" :urls="sd.url" :stair="csk" :second="sd.prop" :prop="sd.prop" :parameter="sd.parameter" @callBack="sd.callBack" v-if="sd.callBack"></zhqcComboBox>
                     <zhqcComboBox :label="sd.label" :urls="sd.url" :stair="csk" :second="sd.prop" :prop="sd.prop" :parameter="sd.parameter" v-else></zhqcComboBox>
                </el-form-item>
                <el-form-item :label="sd.label+'：'" v-if="sd.type==2" :prop="sd.prop">
                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="getdaterange(sd.prop)" v-model="jknmxe">
                    </el-date-picker>
                </el-form-item>
                <el-form-item :label="sd.label+'：'" class="timewer" :prop="sd.prop" v-if="sd.type==3" :class="idx==6||idx==7?'sdrrty':''">
                    <el-date-picker type="date" :placeholder="'请选择'+sd.label" v-model="csk[sd.prop]" value-format="yyyy-MM-dd"></el-date-picker>
                </el-form-item>
                <el-form-item :label="sd.label+'：'" :prop="sd.prop" v-if="sd.type==4">
                    <el-input type="textarea" class="drtteer" rows="3" v-model="csk[sd.prop]"></el-input>
                </el-form-item>
            </div>
        </el-form>
    </div>
</template>
<script>
    import zhqcComboBox from './zhqcComboBox'
    export default {
        props: {
            fieldList: {
                type: Array,
                required: true
            },
            csk: {
                type: Object
            },
            rules: {
                type: Object,
                required: true
            }
        },
        data() {
            return {

            }
        },
        components: {
            zhqcComboBox
        },
        methods: {
            submitForm() {
                this.$refs.ruleForm.validate((valid) => {
                    if (valid) {
                        this.$emit('submitForm')
                    } else {
                        return false;
                    }
                });
            }
        },
        mounted() {}
    }

</script>
<style scoped>

</style>
